package com.egoo.ticket.server.service;

import com.alibaba.fastjson.JSONObject;
import com.egoo.ticket.server.pojo.dto.PageOutputDto;
import com.egoo.ticket.server.pojo.dto.WorkOrderTypeInputDto;
import com.egoo.ticket.server.pojo.vo.InteractiveDataVo;
import com.egoo.ticket.server.pojo.vo.WorkOrderTypeVo;
import com.egoo.ticket.server.utils.common.DbResponse;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
public interface WorkOrderTypeService {
	/**
	 * TODO 根据不同条件获取工单类型列表
	 * @param searchMap
	 * @return
	 */
	List<WorkOrderTypeVo> getWorkOrderTypeListByCondition(Map<String, Object> searchMap);

	/**
	 * TODO
	 * @param jsonObject
	 * @return
	 */
	DbResponse create(JSONObject jsonObject);

	/**
	 * TODO
	 * @param currentPage
	 * @param pageSize
	 * @return
	 */
	PageOutputDto selectAll(Integer currentPage, Integer pageSize);

	/**
	 * TODO
	 * @param name
	 * @param currentPage
	 * @param pageSize
	 * @param userId
	 * @param tenantId
	 * @return
	 */
	PageOutputDto selectByName(String name, Integer currentPage, Integer pageSize, String userId, String tenantId);

	/**
	 * TODO
	 * @param id
	 * @return
	 */
	WorkOrderTypeVo selectById(Long id);

	/**
	 * TODO
	 * @param id
	 * @param userId
	 * @param useStatus
	 * @return
	 */
	Integer updateUseStatus(Long id, String userId, Integer useStatus);

	/**
	 * TODO
	 * @param id
	 * @return
	 */
	JSONObject selectContentById(Long id,String tenantId);

	/**
	 * TODO
	 * @param jsonObject
	 * @return
	 */
	DbResponse updateContent(JSONObject jsonObject);

	/**
	 * TODO
	 * @param id
	 * @param userId
	 * @return
	 */
	Integer updateDeleteStatus(Long id, String userId);

	/**
	 * TODO
	 * @param workOrderTypeInputDto
	 * @return
	 */
	DbResponse deleteBatch(WorkOrderTypeInputDto workOrderTypeInputDto);

	/**
	 * TODO
	 * @param tenantId
	 * @return
	 */
	List<WorkOrderTypeVo> selectAllName(String tenantId);

	/**
	 * TODO
	 * @param tenantId
	 * @return
	 */
	List<InteractiveDataVo> selectAllSelectable(String tenantId);

	String selectStartNodeId(String workOrderTypeId);
}
